//调用接口配置文件
import { request } from 'config/request'
//获取商品列表
export async function getList (params) {
  return request({
    // url: 'yundt/mgmt/item/list-by-page',
    url: 'admin/org/queryRecommendList',
    method: 'POST',
    headers: {
      'Content-type': 'application/json'
    },
    data: params
  })
}

//获取商品详情
export async function getDetail (params) {
  return request({
    url: `admin/org/recommendDetail/${params.id}`,
    method: 'GET',
    data: params
  })
}


//查询统计信息
export async function queryOrgMemberById (params) {
  return request({
    url: `admin/org/queryOrgMemberById`,
    method: 'POST',
    headers: {
      'Content-type': 'application/json'
    },
    data: params
  })
}

//导出
export async function exportList (params) {
  return request({
    url: `admin/org/exportRecommendList`,
    method: 'POST',
    data: params
  })
}
//认证列表
export async function ManualList (params) {
  return request({
    url: `admin/person/queryPersonByMobileOrIdCard`,
    method: 'POST',
    headers: {
      'Content-type': 'application/json'
    },
    data: params
  })
}
//查询列表详情
// export async function ManualDetail (params) {
//   return request({
//     url: `admin/person/history/${params.personId}`,
//     method: 'POST',
//     data: params,
//     headers: {
//       'Content-type': 'application/json'
//     },
//   })
// }
export async function ManualDetail (params) {
  return request({
    url: `admin/person/queryPersonHistoryByIdCard`,
    method: 'POST',
    data: params,
    headers: {
      'Content-type': 'application/json'
    },
  })
}

export async function confimManual(params) {
  console.log(params)
  return request({
    url: `admin/person/merge/${params.personId}`,
    method: 'POST',
    // data: params
    headers: {
      'Content-type': 'application/x-www-form-urlencoded'
    },
  })
}
export async function cancelManual(params) {
  console.log(params)
  return request({
    url: `admin/person/rollback/${params.personId}`,
    method: 'POST',
    // data: params
    headers: {
      'Content-type': 'application/x-www-form-urlencoded'
    },
  })
}
//修改确认

export async function confirmChange(params) {
  console.log(params,"--------")
  return request({
    url: `admin/person/edit`,
    method: 'POST',
    data: params,
    headers: {
      'Content-type': 'application/json'
    },
  })
}
